package com.coincalf.admin.entity;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotations.Version;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 创新交易币种表
 * </p>
 *
 * @author Haliyo
 * @since 2018-05-21
 */
@Data
@Accessors(chain = true)
@TableName("forex_coin")
public class ForexCoin extends Model<ForexCoin> {

    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.ID_WORKER)
    private Long id;
    /**
     * 币种名称
     */
    @ApiModelProperty(value="名称",name="name",example="",required=true)
    private String name;
    /**
     * 币种标题
     */
    @ApiModelProperty(value="标题",name="title",example="",required=true)
    private String title;

    /**
     * 状态: 0禁用 1启用
     */
    @ApiModelProperty(value="排序",name="sort",example="1",required=false)
    private Integer sort;

    /**
     * 状态: 0禁用 1启用
     */
    @ApiModelProperty(value="状态",name="status",example="0 禁用 1 启用",required=true)
    private Integer status;
    /**
     * 修改时间
     */
    @TableField("last_update_time")
    @JsonIgnore
    @ApiModelProperty(hidden = true)
    private Date lastUpdateTime;
    /**
     * 创建时间
     */
    @JsonIgnore
    @ApiModelProperty(hidden = true)
    private Date created;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
